package utils;

public class ExceptionUtil {
	/**
	 * 获取当前调用的函数,方法名,如果传入null则不拼接order
	 * @param orderNO  传入null则不拼接
	 * @return
	 */
	public static String getMessageHead(String orderNO){
		StringBuffer sb = new StringBuffer("");
		StackTraceElement[] eles = Thread.currentThread().getStackTrace();
		sb.append("class:").append(eles[2].getClassName()).append(",")
		.append("method:").append(eles[2].getMethodName());
		if( !(null == orderNO || "".equals(orderNO))){//有订单信息
			sb.append(",").append("order:").append(orderNO);
		}
		sb.append("#");
		return sb.toString();
	}
}
